Page({
  data: {
    name: "",
  },
  submitForm(data) {
    let info = data.detail.value;
    let name = info.uname;
    let phone = info.phone;
    let address = info.address;
    if (!(name && phone && address)) {
      wx.showToast({
        title: "请输入完整信息",
        icon: "none",
        duration: 2000,
      });
    } else {
      wx.showToast({
        title: "提交成功",
        icon: "success",
        duration: 1000,
      });
      setTimeout(() => {
        wx.reLaunch({
          url: "/pages/success/success",
        });
      }, 1000);
    }
  },
});
